package dahuiji.resetpassword.service;

import dahuiji.common.dao.BaceDao;
/**
 * 重置密码
 * @author Administrator
 *
 */
public class ResetPasswordService {
	private BaceDao baceDao;
	/**
	 * 重置密码
	 * @param newPassword
	 * @param userId
	 * @return
	 */
	public boolean updatePassword(String newPassword, Long userId) {
		if (newPassword != null && userId != null) {
			String sqlString = "UPDATE tb_dahuiji_user set `PASSWORD` =" + "'"
					+ newPassword + "'" + "WHERE USER_ID=" + userId;
			baceDao = new BaceDao();
			baceDao.executeBySql(sqlString);
			return true;
		}

		return false;
	}

}
